-
Notifications
You must be signed in to change notification settings - Fork 7.4k
Bluetooth: CAP: Implement handover procedures #85642
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
2455612
to
7d7b6b0
Compare
4ef45c7
to
ae9d7b8
Compare
b233435
to
3157de2
Compare
d331e58
to
dbe3d65
Compare
Adds a new abstract struct for unicast group that is specific for CAP. The difference between this and the BAP unicast group, is that the parameters are CAP streams and thus ensuring that the streams in the group adhere to the additional requirements that CAP has on top of BAP. This also adds foreach functions for both CAP and BAP to allow users to iterate on the streams in the abstract groups. Various samples, modules and tests have been updated to use the CAP struct and API. Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
The bt_le_ext_adv_info struct has been extended to also contain the advertising and periodic advertising states. Additionally, the function verifies the input to avoid NULL pointer access, and the addr field is more properly documented. Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Add a common function, start_broadcast_adv, to start broadcast advertisement in the LE Audio BSIM tests. Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
Add a common definition of the TEST_SAMPLE_SIRK used by the BSIM tests. Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
690db3b
to
096bb4b
Compare
Implement the unicast to broadcast handover procedure, as per the Bluetooth CAP specificiation. Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR implements the handover procedures defined in the Bluetooth CAP specification while also refactoring and unifying unicast group APIs (renaming many bap_ functions to cap_ functions) across tests, host, and sample applications.
- Replaces manual extended/periodic advertising start calls with a common helper (start_broadcast_adv) in tests.
- Introduces new CAP unicast group API functions (create, reconfig, add_streams, delete, foreach_stream) with handover support.
- Updates samples, shell commands, and related configuration to support the new handover procedures.
Reviewed Changes
Copilot reviewed 34 out of 34 changed files in this pull request and generated 6 comments.
Show a summary per file
File | Description |
---|---|
tests/bsim/bluetooth/audio/src/bap_broadcast_source_test.c | Replaces explicit advertising start calls with start_broadcast_adv, consolidating error handling. |
tests/bsim/bluetooth/audio/src/bap_bass_broadcaster_test.c | Similar consolidation of advertising start logic via start_broadcast_adv. |
tests/bluetooth/audio/mocks/src/kernel.c | Adds additional fake definitions to support semaphore operations in tests. |
tests/bluetooth/audio/cap_initiator/uut/bap_unicast_client.c | Implements CAP unicast group API functions with a static unicast group instance. |
tests/bluetooth/audio/cap_initiator/src/test_unicast_group.c | Adds comprehensive tests for the new CAP unicast group APIs with detailed error cases. |
subsys/bluetooth/host/shell/bt.c & adv.c | Updates shell commands and adv info reporting to include new extended/periodic advertising states. |
subsys/bluetooth/audio/shell/cap_initiator.c | Refactors unicast client shell command API calls to use CAP-specific functions. |
subsys/bluetooth/audio/cap_internal.h, cap_common.c, cap_commander.c | Introduces handover-specific procedure states and helper functions for managing CAP procedures. |
subsys/bluetooth/audio/bap_unicast_client.c | Updates unicast group validation and adds a foreach_stream iterator with logging. |
Kconfig.cap | Adds configuration support for CAP handover. |
Samples & Include files (cap_initiator.c, cap_initiator_unicast.c, bluetooth.h, cap.h, bap.h, release notes) | Updates API usage and documentation to reflect CAP handover and API renaming. |
Implements the handover procedures, as per the Bluetooth CAP specificiation.
Fixes #47313